package com.petc.api.controller;

import com.petc.api.common.pojo.CommonResult;
import com.petc.api.controller.param.base.UserLoginParam;
import com.petc.api.controller.view.base.UserLoginView;
import com.petc.api.service.base.BaseService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping("/base")
public class BaseController {


    @Resource
    private BaseService baseService;


    /**
     * 小程序授权登录
     * @param view
     * @return
     */
    @PostMapping("/login")
    @ResponseBody
    public CommonResult<UserLoginParam> login(@RequestBody UserLoginView view) {
        return baseService.login(view);
    }

}
